#include <iostream>

using namespace std;

class Draw
{
private:
    int height;
public:
    Draw(int height):height(height){}
    void drawTriangle()
    {
        for(int i=1;i<=height;i++)
        {
            for(int j=0;j<=height-i;j++)
            {
                cout<<" ";
            }
            for(int k=1;k<=2*i-1;k++)
            {
                cout<<"*";
            }
            cout<<endl;
        }
    }
    void drawRectangle()
    {
        for(int i=1;i<=height;i++)
        {
            for(int j=1;j<=height;j++)
            {
                cout<<"*";
            }
            cout<<endl;
        }
    }
    void drawSquare()
    {
        for(int i=1;i<=height;i++)
        {
            for(int j=i;j<=i+height;j++)
            {
                cout<<"*";
            }
            cout<<endl;
        }
    }
    void drawParallelogram()
    {
        for(int i=1;i<=height;i++)
        {
            for(int j=0;j<=i-1;j++)
            {
                cout<<" ";
            }
            for(int k=1;k<=height;k++)
            {
                cout<<"*";
            }

            cout<<endl;
        }
    }

};
int main()
{
    Draw s(5);
    s.drawTriangle();
    cout<<endl;
    s.drawRectangle();
    cout<<endl;
    s.drawSquare();
    cout<<endl;
    s.drawParallelogram();
    return 0;
}
